package com.yc.supermarket.entity;

import java.math.BigDecimal;
import java.util.Date;
/*购物车实体类*/
public class ShoppingCart {
    private int cardId;
    private String userName;
    private int productId;
    private int quantity;
    private String commodityName;
    private int price;
    private int userId;
    private String commodityPic;

    private Double totalPrice;

    public ShoppingCart() {
    }



    public int getCardId() {
        return cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getCommodityPic() {
        return commodityPic;
    }

    public void setCommodityPic(String commodityPic) {
        this.commodityPic = commodityPic;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public ShoppingCart(int cardId, String userName, int productId, int quantity, String commodityName, int price, int userId, String commodityPic, Double totalPrice) {
        this.cardId = cardId;
        this.userName = userName;
        this.productId = productId;
        this.quantity = quantity;
        this.commodityName = commodityName;
        this.price = price;
        this.userId = userId;
        this.commodityPic = commodityPic;
        this.totalPrice = totalPrice;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "ShoppingCart{" +
                "cardId=" + cardId +
                ", userName='" + userName + '\'' +
                ", productId=" + productId +
                ", quantity=" + quantity +
                ", commodityName='" + commodityName + '\'' +
                ", price=" + price +
                ", userId=" + userId +
                ", commodityPic='" + commodityPic + '\'' +
                ", totalPrice=" + totalPrice +
                '}';
    }
}
